package com.mt.restaurant.dao.staff;

import com.mt.common.core.web.base.PageDTO;
import com.mt.common.core.web.base.PageResultDTO;
import com.mt.restaurant.entity.staff.StaffAttendanceRecords;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
@Component(value = "staffAttendanceRecordsDao")
public interface StaffAttendanceRecordsDao {

    /**
    * 根据分页参数查询学生信息集合
    *
    * @param pageDTO 分页条件
    */
    public List<StaffAttendanceRecords> findStaffAttendanceRecordss(PageDTO pageDTO);

    /**
    * 查询全部学生信息集合
    *
    */
    public List<StaffAttendanceRecords> findAllStaffAttendanceRecordss();

    /**
    * 查询所有学生信息集合(只提取ID 和 Name)
    *
    */
    public List<StaffAttendanceRecords> findAllStaffAttendanceRecordssWithIdName();

    /**
    * 根据名称查询学生信息集合(只提取ID 和 Name)
    *
    * @param staffAttendanceRecordsName 名称
    */
    public List<StaffAttendanceRecords> findStaffAttendanceRecordssWithIdNameByName(@Param("staffAttendanceRecordsName") String staffAttendanceRecordsName);

    /**
    * 根据ID查询指定的学生信息(只提取ID 和 Name)
    *
    * @param staffAttendanceRecordsId Id
    */
    public StaffAttendanceRecords findStaffAttendanceRecordssWithIdNameById(@Param(" staffAttendanceRecordsId") Long staffAttendanceRecordsId);

    /**
    * 根据分页参数查询学生信息集合的数量
    *
    * @param pageDTO 分页条件
    */
    public Long findStaffAttendanceRecordsTotalCount(PageDTO pageDTO);

    /**
    * 根据ID查询指定的学生信息
    *
    * @param staffAttendanceRecordsId Id
    */
    public StaffAttendanceRecords findStaffAttendanceRecords(@Param("staffAttendanceRecordsId") Long staffAttendanceRecordsId);

    /**
    * 根据ID查询指定的学生信息(包含外键)
    *
    * @param staffAttendanceRecordsId Id
    */
    public StaffAttendanceRecords findStaffAttendanceRecordsWithForeignName(@Param("staffAttendanceRecordsId") Long staffAttendanceRecordsId);

    /**
    * 新增学生信息
    *
    * @param staffAttendanceRecords 实体对象
    */
    public Long saveStaffAttendanceRecords(StaffAttendanceRecords staffAttendanceRecords);

    /**
    * 更新学生信息
    *
    * @param staffAttendanceRecords 实体对象
    */
    public Long updateStaffAttendanceRecords(StaffAttendanceRecords staffAttendanceRecords);

    /**
    * 根据ID删除学生信息
    *
    * @param staffAttendanceRecordsId ID
    */
    public Long deleteStaffAttendanceRecords(@Param("staffAttendanceRecordsId") Long staffAttendanceRecordsId);



    List<StaffAttendanceRecords> findAllStaffAttendanceRecordsByStaffIdAndDate(@Param("staffId") Long staffId,@Param("startDate") String startDate,@Param("endDate") String endDate);
}
